<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class=" text-area">
			<text class="title">{{title}}</text>
		</view>
		<view >
			<view>{{number +1}}</view>
			<view>{{ok ?'YES' : 'NO'}}</view>
			<view>{{ message.split('').reverse().join('')}}</view>
		</view>
		
		<view v-if="!raining">今天天气真好</view>
		<view v-if="raining">今天下雷阵雨，只能在家里呆着了</view>
		<view v-if="state==='vue'">state的值是 Vue</view>
		<view >State is {{state?'vue':'app'}}</view>
		
		
		<view v-for="item in arr" style=" color:brown;">
			{{item}}
		</view>
		<view v-for="(item,index) in 4" style="color: aqua;">
			<view :class="'list-' + index%2">{{index%2}}</view>
		</view>
		<view v-for="(value,name,index) in object">
			{{index}}. {{name}}:{{value}}
		</view>
		<view v-for="item in arr" :key="item.id">
			<view style="color: blue;">{{item.id}}:{{item.name}}</view>
		</view>
		
		<view :class="one" @click="open()"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:"Hello World!",
				number:4 ,
			    ok:false,
				raining:true,
				state:"vue",
				one:"boxone",
				message:"Hello World!",
				className:"box",
				arr:[
					{id : 1,name :"ruanjian"},
					{id : 2, name :"kaifa"}
				],
				object:{
					title:"How to do lists in Vue ",
					author:"Jane dawi",
					publishedAt:"2025-10-14"
				}
			}
		},
		methods: {
			open(){
				this.one="box_two"
			}
			
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	
	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}
	
	.text-area {
		display: flex;
		justify-content: center;
	}
	
	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	.box{
		height: 200rpx;
		width: 200rpx;

		
	}
	.boxone{
		height: 200rpx;
		width: 200rpx;
		color: #ffaa00;
		
	}

</style>
